﻿using System;
public delegate bool GradePrint(Student s);
public class Student
{
    public string Name { get; set; }
    public double Score { get; set; }
    public GradePrint GP { get; set; }

    public Student(string name, double score)
    {
        Name = name;
        Score = score;
    }
}
public class GradeReport
{
    public static bool OrderByTerm(Student s)
    {
        Console.WriteLine($"【学期模板】学生 {s.Name} 的成绩：{s.Score}");
        return true;
    }

    public static bool OrderByClass(Student s)
    {
        Console.WriteLine($"【班级模板】学生 {s.Name} 的成绩：{s.Score}");
        return true;
    }
}
class Program
{
    static void Main(string[] args)
    {
        Student stu1 = new Student("张三", 90);
        Student stu2 = new Student("李四", 85);
        stu1.GP = GradeReport.OrderByTerm;
        stu2.GP = GradeReport.OrderByClass;
        stu1.GP(stu1);
        stu2.GP(stu2);

        Console.ReadKey();
    }
}